Skip to content

Feat: Support creating warmed VM in the proxy wasm V8 VM API. #447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rachgreen33
Copy link
Contributor

No description provided.

@mpwarres
Copy link
Contributor

mpwarres commented Aug 1, 2025

Looks like you need to add no-op implementations of warm() to other subclasses of WasmVm to fix the current build failures.

@PiotrSikora
Copy link
Member

PiotrSikora commented Aug 5, 2025

FYI, there is already an open PR with support for warming VMs (including other engines and tests): #280

@mpwarres
Copy link
Contributor

mpwarres commented Aug 8, 2025

FYI, there is already an open PR with support for warming VMs (including other engines and tests): #280

Thanks for pointing that out! I'd forgotten that existed. Looking at the two PR's I'd propose that we combine them together and "do both". As you point out, the benefit of #280 is that it provides init*Engine() impls for all engines. However, it does not instantiate wasm::Stores, which is another source of Wasm startup expense that could be performed ahead of time, while this PR does do that.

So how about we combine the two PRs:

  • Add all the init*Engine() static functions and the TestVm.Init test from Add the ability to "pre-warm" Wasm engines. #280. This would give embedding code the option of initializing engines (by themselves) early, if desired.
  • Add the virtual WasmVm::warm() method from this PR
  • Fill in the warm() implementations for Wamr, Wasmtime, and WasmEdge classes, which should each be very similar to V8 since they are all using C-Api, i.e. instantiate a wasm::Store and store it in the (existing) store_ field.

@rachgreen33 LMK if you'd like me to create a PR that does this, or if you'd prefer to update this one yourself. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants